e' => 'number' ) ), 'example' => array( ), 'usesContext' => array( 'postId', 'postType', 'queryId' ), 'textdomain' => 'woocommerce', 'apiVersion' => 3, '$schema' => 'https://schemas.wp.org/trunk/block.json' ), 'stock-filter' => array( 'name' => 'woocommerce/stock-filter', 'title' => 'Filter by Stock Controls', 'description' => 'Enable customers to filter the product grid by stock status.', 'category' => 'woocommerce', 'keywords' => array( 'WooCommerce' ), 'supports' => array( 'interactivity' => array( 'clientNavigation' => false ), 'html' => false, 'multiple' => false, 'color' => array( 'background' => true, 'text' => true, 'button' => true ), 'inserter' => false, 'lock' => false ), 'attributes' => array( 'className' => array( 'type' => 'string', 'default' => '' ), 'headingLevel' => array( 'type' => 'number', 'default' => 3 ), 'showCounts' => array( 'type' => 'boolean', 'default' => false ), 'showFilterButton' => array( 'type' => 'boolean', 'default' => false ), 'displayStyle' => array( 'type' => 'string', 'default' => 'list' ), 'selectType' => array( 'type' => 'string', 'default' => 'multiple' ), 'isPreview' => array( 'type' => 'boolean', 'default' => false ) ), 'textdomain' => 'woocommerce', 'apiVersion' => 3, '$schema' => 'https://schemas.wp.org/trunk/block.json' ), 'store-notices' => array( 'name' => 'woocommerce/store-notices', 'title' => 'Store Notices', 'description' => 'Display shopper-facing notifications generated by WooCommerce or extensions.', 'category' => 'woocommerce', 'keywords' => array( 'WooCommerce' ), 'supports' => array( 'interactivity' => array( 'clientNavigation' => true ), 'multiple' => false, 'align' => array( 'wide', 'full' ) ), 'attributes' => array( 'align' => array( 'type' => 'string', 'default' => 'wide' ) ), 'textdomain' => 'woocommerce', 'apiVersion' => 3, '$schema' => 'https://schemas.wp.org/trunk/block.json' ), 'wishlist' => array( '$schema' => 'https://schemas.wp.org/trunk/block.json', 'apiVersion' => 3, 'name' => 'woocommerce/wishlist', 'version' => '1.0.0', 'title' => 'Wishlist', 'description' => 'Display the shopper\'s wishlist.', 'category' => 'woocommerce', 'keywords' => array( 'WooCommerce', 'Wishlist' ), 'textdomain' => 'woocommerce', 'attributes' => array( 'columnCount' => array( 'type' => 'number', 'default' => 5 ) ), 'allowedBlocks' => array( 'core/heading' ), 'supports' => array( 'align' => array( 'wide', 'full' ), 'interactivity' => true, 'html' => false, 'reusable' => false, 'spacing' => array( 'margin' => true, 'padding' => true, 'blockGap' => true ), 'typography' => array( 'fontSize' => true, 'lineHeight' => true ), 'color' => array( 'text' => true, 'background' => true ) ), 'viewScriptModule' => 'woocommerce/wishlist', 'style' => array( 'file:../woocommerce/wishlist-style.css', 'wc-blocks-style-product-image', 'woocommerce-product-price-style', 'woocommerce-product-button-style' ) ), 'cart-accepted-payment-methods-block' => array( 'name' => 'woocommerce/cart-accepted-payment-methods-block', 'version' => '1.0.0', 'title' => 'Accepted Payment Methods', 'description' => 'Display accepted payment methods.', 'category' => 'woocommerce', 'supports' => array( 'align' => false, 'html' => false, 'multiple' => false, 'reusable' => false, 'inserter' => true ), 'parent' => array( 'woocommerce/cart-totals-block' ), 'textdomain' => 'woocommerce', '$schema' => 'https://schemas.wp.org/trunk/block.json', 'apiVersion' => 3 ), 'cart-cross-sells-block' => array( 'name' => 'woocommerce/cart-cross-sells-block', 'version' => '1.0.0', 'title' => 'Cart Cross-Sells', 'description' => 'Shows the Cross-Sells block.', 'category' => 'woocommerce', 'supports' => array( 'align' => false, 'html' => false, 'multiple' => false, 'reusable' => false, 'inserter' => false ), 'parent' => array( 'woocommerce/cart-items-block' ), 'textdomain' => 'woocommerce', '$schema' => 'https://schemas.wp.org/trunk/block.json', 'apiVersion' => 3 ), 'cart-cross-sells-products-block' => array( 'name' => 'woocommerce/cart-cross-sells-products-block', 'version' => '1.0.0', 'title' => 'Cart Cross-Sells Products', 'description' => 'Shows the Cross-Sells products.', 'category' => 'woocommerce', 'supports' => array( 'align' => false, 'html' => false, 'multiple' => false, 'reusable' => false, 'inserter' => false, 'lock' => false, 'email' => true ), 'attributes' => array( 'columns' => array( 'type' => 'number', 'default' => 3 ), 'lock' => array( 'type' => 'object', 'default' => array( 'remove' => true, 'move' => true ) ) ), 'parent' => array( 'woocommerce/cart-cross-sells-block' ), 'textdomain' => 'woocommerce', '$schema' => 'https://schemas.wp.org/trunk/block.json', 'apiVersion' => 3 ), 'cart-express-payment-block' => array( 'name' => 'woocommerce/cart-express-payment-block', 'version' => '1.0.0', 'title' => 'Express Checkout', 'description' => 'Allow customers to breeze through with quick payment options.', 'category' => 'woocommerce', 'supports' => array( 'align' => false, 'html' => false, 'multiple' => false, 'reusable' => false, 'inserter' => false, 'lock' => false ), 'attributes' => array( 'showButtonStyles' => array( 'type' => 'boolean', 'default' => false ), 'buttonHeight' => array( 'type' => 'string', 'default' => '48' ), 'buttonBorderRadius' => array( 'type' => 'string', 'default' => '4' ), 'lock' => array( 'type' => 'object', 'default' => array( 'remove' => true, 'move' => true ) ) ), 'parent' => array( 'woocommerce/cart-totals-block' ), 'textdomain' => 'woocommerce', '$schema' => 'https://schemas.wp.org/trunk/block.json', 'apiVersion' => 3 ), 'cart-items-block' => array( 'name' => 'woocommerce/cart-items-block', 'version' => '1.0.0', 'title' => 'Cart Items', 'description' => 'Column containing cart items.', 'category' => 'woocommerce', 'supports' => array( 'align' => false, 'html' => false, 'multiple' => false, 'reusable' => false, 'inserter' => false, 'lock' => false ), 'attributes' => array( 'lock' => array( 'type' => 'object', 'default' => array( 'remove' => true, 'move' => true ) ) ), 'parent' => array( 'woocommerce/filled-cart-block' ), 'textdomain' => 'woocommerce', '$schema' => 'https://schemas.wp.org/trunk/block.json', 'apiVersion' => 3 ), 'cart-line-items-block' => array( 'name' => 'woocommerce/cart-line-items-block', 'version' => '1.0.0', 'title' => 'Cart Line Items', 'description' => 'Block containing current line items in Cart.', 'category' => 'woocommerce', 'supports' => array( 'align' => false, 'html' => false, 'multiple' => false, 'reusable' => false, 'inserter' => false, 'lock' => false ), 'attributes' => array( 'lock' => array( 'type' => 'object', 'default' => array( 'remove' => true, 'move' => true ) ) ), 'parent' => array( 'woocommerce/cart-items-block' ), 'textdomain' => 'woocommerce', '$schema' => 'https://schemas.wp.org/trunk/block.json', 'apiVersion' => 3 ), 'cart-order-summary-block' => array( 'name' => 'woocommerce/cart-order-summary-block', 'version' => '1.0.0', 'title' => 'Order Summary', 'description' => 'Show customers a summary of their order.', 'category' => 'woocommerce', 'supports' => array( 'align' => false, 'html' => false, 'multiple' => false, 'reusable' => false, 'inserter' => false, 'lock' => false ), 'attributes' => array( 'lock' => array( 'type' => 'object', 'default' => array( 'remove' => true, 'move' => true ) ) ), 'parent' => array( 'woocommerce/cart-totals-block' ), 'textdomain' => 'woocommerce', '$schema' => 'https://schemas.wp.org/trunk/block.json', 'apiVersion' => 3 ), 'cart-order-summary-coupon-form-block' => array( 'name' => 'woocommerce/cart-order-summary-coupon-form-block', 'version' => '1.0.0', 'title' => 'Coupon Form', 'description' => 'Shows the apply coupon form.', 'category' => 'woocommerce', 'supports' => array( 'align' => false, 'html' => false, 'multiple' => false, 'reusable' => false ), 'attributes' => array( 'className' => array( 'type' => 'string', 'default' => '' ), 'lock' => array( 'type' => 'object', 'default' => array( 'remove' => false, 'move' => false ) ) ), 'parent' => array( 'woocommerce/cart-order-summary-block' ), 'textdomain' => 'woocommerce', '$schema' => 'https://schemas.wp.org/trunk/block.json', 'apiVersion' => 3 ), 'cart-order-summary-discount-block' => array( 'name' => 'woocommerce/cart-order-summary-discount-block', 'version' => '1.0.0', 'title' => 'Discount', 'description' => 'Shows the cart discount row.', 'category' => 'woocommerce', 'supports' => array( 'align' => false, 'html' => false, 'multiple' => false, 'reusable' => false, 'lock' => false ), 'attributes' => array( 'className' => array( 'type' => 'string', 'default' => '' ), 'lock' => array( 'type' => 'object', 'default' => array( 'remove' => true, 'move' => true ) ) ), 'parent' => array( 'woocommerce/cart-order-summary-totals-block' ), 'textdomain' => 'woocommerce', '$schema' => 'https://schemas.wp.org/trunk/block.json', 'apiVersion' => 3 ), 'cart-order-summary-fee-block' => array( 'name' => 'woocommerce/cart-order-summary-fee-block', 'version' => '1.0.0', 'title' => 'Fees', 'description' => 'Shows the cart fee row.', 'category' => 'woocommerce', 'supports' => array( 'align' => false, 'html' => false, 'multiple' => false, 'reusable' => false, 'lock' => false ), 'attributes' => array( 'className' => array( 'type' => 'string', 'default' => '' ), 'lock' => array( 'type' => 'object', 'default' => array( 'remove' => true, 'move' => true ) ) ), 'parent' => array( 'woocommerce/cart-order-summary-totals-block' ), 'textdomain' => 'woocommerce', '$schema' => 'https://schemas.wp.org/trunk/block.json', 'apiVersion' => 3 ), 'cart-order-summary-heading-block' => array( 'name' => 'woocommerce/cart-order-summary-heading-block', 'version' => '1.0.0', 'title' => 'Heading', 'description' => 'Shows the heading row.', 'category' => 'woocommerce', 'supports' => array( 'align' => false, 'html' => false, 'multiple' => false, 'reusable' => false ), 'attributes' => array( 'className' => array( 'type' => 'string', 'default' => '' ), 'content' => array( 'type' => 'string', 'default' => 'Cart totals' ), 'lock' => array( 'type' => 'object', 'default' => array( 'remove' => false, 'move' => false ) ) ), 'parent' => array( 'woocommerce/cart-order-summary-block' ), 'textdomain' => 'woocommerce', '$schema' => 'https://schemas.wp.org/trunk/block.json', 'apiVersion' => 3 ), 'cart-order-summary-shipping-block' => array( 'name' => 'woocommerce/cart-order-summary-shipping-block', 'version' => '1.0.0', 'title' => 'Shipping', 'description' => 'Shows the cart shipping row.', 'category' => 'woocommerce', 'supports' => array( 'align' => false, 'html' => false, 'multiple' => false, 'reusable' => false, 'lock' => false ), 'attributes' => array( 'lock' => array( 'type' => 'object', 'default' => array( 'remove' => true, 'move' => true ) ) ), 'parent' => array( 'woocommerce/cart-order-summary-totals-block' ), 'textdomain' => 'woocommerce', '$schema' => 'https://schemas.wp.org/trunk/block.json', 'apiVersion' => 3 ), 'cart-order-summary-subtotal-block' => array( 'name' => 'woocommerce/cart-order-summary-subtotal-block', 'version' => '1.0.0', 'title' => 'Subtotal', 'description' => 'Shows the cart subtotal row.', 'category' => 'woocommerce', 'supports' => array( 'align' => false, 'html' => false, 'multiple' => false, 'reusable' => false, 'lock' => false ), 'attributes' => array( 'className' => array( 'type' => 'string', 'default' => '' ), 'lock' => array( 'type' => 'object', 'default' => array( 'remove' => true, 'move' => true ) ) ), 'parent' => array( 'woocommerce/cart-order-summary-totals-block' ), 'textdomain' => 'woocommerce', '$schema' => 'https://schemas.wp.org/trunk/block.json', 'apiVersion' => 3 ), 'cart-order-summary-taxes-block' => array( 'name' => 'woocommerce/cart-order-summary-taxes-block', 'version' => '1.0.0', 'title' => 'Taxes', 'description' => 'Shows the cart taxes row.', 'category' => 'woocommerce', 'supports' => array( 'align' => false, 'html' => false, 'multiple' => false, 'reusable' => false, 'lock' => false ), 'attributes' => array( 'className' => array( 'type' => 'string', 'default' => '' ), 'lock' => array( 'type' => 'object', 'default' => array( 'remove' => true, 'move' => true ) ) ), 'parent' => array( 'woocommerce/cart-order-summary-totals-block' ), 'textdomain' => 'woocommerce', '$schema' => 'https://schemas.wp.org/trunk/block.json', 'apiVersion' => 3 ), 'cart-order-summary-totals-block' => array( 'name' => 'woocommerce/cart-order-summary-totals-block', 'version' => '1.0.0', 'title' => 'Totals', 'description' => 'Shows the subtotal, fees, discounts, shipping and taxes.', 'category' => 'woocommerce', 'supports' => array( 'align' => false, 'html' => false, 'multiple' => false, 'reusable' => false, 'lock' => false ), 'attributes' => array( 'className' => array( 'type' => 'string', 'default' => '' ), 'lock' => array( 'type' => 'object', 'default' => array( 'remove' => true, 'move' => false ) ) ), 'parent' => array( 'woocommerce/cart-order-summary-block' ), 'textdomain' => 'woocommerce', '$schema' => 'https://schemas.wp.org/trunk/block.json', 'apiVersion' => 3 ), 'cart-totals-block' => array( 'name' => 'woocommerce/cart-totals-block', 'version' => '1.0.0', 'title' => 'Cart Totals', 'description' => 'Column containing the cart totals.', 'category' => 'woocommerce', 'supports' => array( 'align' => false, 'html' => false, 'multiple' => false, 'reusable' => false, 'inserter' => false, 'lock' => false ), 'attributes' => array( 'checkbox' => array( 'type' => 'boolean', 'default' => false ), 'text' => array( 'type' => 'string', 'required' => false ), 'lock' => array( 'type' => 'object', 'default' => array( 'remove' => true ) ) ), 'parent' => array( 'woocommerce/filled-cart-block' ), 'textdomain' => 'woocommerce', '$schema' => 'https://schemas.wp.org/trunk/block.json', 'apiVersion' => 3 ), 'checkout-actions-block' => array( 'name' => 'woocommerce/checkout-actions-block', 'version' => '1.0.0', 'title' => 'Actions', 'description' => 'Allow customers to place their order.', 'category' => 'woocommerce', 'supports' => array( 'align' => false, 'html' => false, 'multiple' => false, 'reusable' => false, 'inserter' => false, 'lock' => false ), 'attributes' => array( 'lock' => array( 'type' => 'object', 'default' => array( 'remove' => true, 'move' => true ) ), 'cartPageId' => array( 'type' => 'number', 'default' => 0 ), 'showReturnToCart' => array( 'type' => 'boolean', 'default' => false ), 'className' => array( 'type' => 'string', 'default' => '' ), 'priceSeparator' => array( 'type' => 'string', 'default' => 'ยท' ) ), 'parent' => array( 'woocommerce/checkout-fields-block' ), 'textdomain' => 'woocommerce', '$schema' => 'https://schemas.wp.org/trunk/block.json', 'apiVersion' => 3 ), 'checkout-additional-information-block' => array( 'name' => 'woocommerce/checkout-additional-information-block', 'version' => '1.0.0', 'title' => 'Additional information', 'description' => 'Render additional fields in the \'Additional information\' location.', 'category' => 'woocommerce', 'supports' => array( 'align' => false, 'html' => false, 'multiple' => false, 'reusable' => false ), 'attributes' => array( 'className' => array( 'type' => 'string', 'default' => '' ), 'lock' => array( 'type' => 'object', 'default' => array( 'remove' => true, 'move' => false ) ) ), 'parent' => array( 'woocommerce/checkout-fields-block' ), 'textdomain' => 'woocommerce', '$schema' => 'https://schemas.wp.org/trunk/block.json', 'apiVersion' => 3 ), 'checkout-billing-address-block' => array( 'name' => 'woocommerce/checkout-billing-address-block', 'version' => '1.0.0', 'title' => 'Billing Address', 'description' => 'Collect your customer\'s billing address.', 'category' => 'woocommerce', 'supports' => array( 'align' => false, 'html' => false, 'multiple' => false, 'reusable' => false, 'inserter' => false, 'lock' => false ), 'attributes' => array( 'lock' => array( 'type' => 'object', 'default' => array( 'remove' => true, 'move' => true ) ) ), 'parent' => array( 'woocommerce/checkout-fields-block' ), 'textdomain' => 'woocommerce', '$schema' => 'https://schemas.wp.org/trunk/block.json', 'apiVersion' => 3 ), 'checkout-contact-information-block' => array( 'name' => 'woocommerce/checkout-contact-information-block', 'version' => '1.0.0', 'title' => 'Contact Information', 'description' => 'Collect your customer\'s contact information.', 'category' => 'woocommerce', 'supports' => array( 'align' => false, 'html' => false, 'multiple' => false, 'reusable' => false, 'inserter' => false, 'lock' => false ), 'attributes' => array( 'lock' => array( 'type' => 'object', 'default' => array( 'remove' => true, 'move' => true ) ) ), 'parent' => array( 'woocommerce/checkout-fields-block' ), 'textdomain' => 'woocommerce', '$schema' => 'https://schemas.wp.org/trunk/block.json', 'apiVersion' => 3 ), 'checkout-express-payment-block' => array( 'name' => 'woocommerce/checkout-express-payment-block', 'version' => '1.0.0', 'title' => 'Express Checkout', 'description' => 'Allow customers to breeze through with quick payment options.', 'category' => 'woocommerce', 'supports' => array( 'align' => false, 'html' => false, 'multiple' => false, 'reusable' => false, 'inserter' => false, 'lock' => false ), 'attributes' => array( 'showButtonStyles' => array( 'type' => 'boolean', 'default' => false ), 'buttonHeight' => array( 'type' => 'string', 'default' => '48' ), 'buttonBorderRadius' => array( 'type' => 'string', 'default' => '4' ), 'className' => array( 'type' => 'string', 'default' => '' ), 'lock' => array( 'type' => 'object', 'default' => array( 'remove' => true, 'move' => true ) ) ), 'parent' => array( 'woocommerce/checkout-fields-block' ), 'textdomain' => 'woocommerce', '$schema' => 'https://schemas.wp.org/trunk/block.json', 'apiVersion' => 3 ), 'checkout-fields-block' => array( 'name' => 'woocommerce/checkout-fields-block', 'version' => '1.0.0', 'title' => 'Checkout Fields', 'description' => 'Column containing checkout address fields.', 'category' => 'woocommerce', 'supports' => array( 'align' => false, 'html' => false, 'multiple' => false, 'reusable' => false, 'inserter' => false, 'lock' => false ), 'attributes' => array( 'className' => array( 'type' => 'string', 'default' => '' ), 'lock' => array( 'type' => 'object', 'default' => array( 'remove' => true, 'move' => true ) ) ), 'parent' => array( 'woocommerce/checkout' ), 'textdomain' => 'woocommerce', '$schema' => 'https://schemas.wp.org/trunk/block.json', 'apiVersion' => 3 ), 'checkout-order-note-block' => array( 'name' => 'woocommerce/checkout-order-note-block', 'version' => '1.0.0', 'title' => 'Order Note', 'description' => 'Allow customers to add a note to their order.', 'category' => 'woocommerce', 'supports' => array( 'align' => false, 'html' => false, 'multiple' => false, 'reusable' => false ), 'attributes' => array( 'className' => array( 'type' => 'string', 'default' => '' ), 'lock' => array( 'type' => 'object', 'default' => array( 'remove' => false, 'move' => true ) ) ), 'parent' => array( 'woocommerce/checkout-fields-block' ), 'textdomain' => 'woocommerce', '$schema' => 'https://schemas.wp.org/trunk/block.json', 'apiVersion' => 3 ), 'checkout-order-summary-block' => array( 'name' => 'woocommerce/checkout-order-summary-block', 'version' => '1.0.0', 'title' => 'Order Summary', 'description' => 'Show customers a summary of their order.', 'category' => 'woocommerce', 'supports' => array( 'align' => false, 'html' => false, 'multiple' => false, 'reusable' => false, 'inserter' => false, 'lock' => false ), 'attributes' => array( 'lock' => array( 'type' => 'object', 'default' => array( 'remove' => true ) ) ), 'parent' => array( 'woocommerce/checkout-totals-block' ), 'textdomain' => 'woocommerce', '$schema' => 'https://schemas.wp.org/trunk/block.json', 'apiVersion' => 3 ), 'checkout-order-summary-cart-items-block' => array( 'name' => 'woocommerce/checkout-order-summary-cart-items-block', 'version' => '1.0.0', 'title' => 'Cart Items', 'description' => 'Shows cart items.', 'category' => 'woocommerce', 'supports' => array( 'align' => false, 'html' => false, 'multiple' => false, 'reusable' => false, 'lock' => false ), 'attributes' => array( 'className' => array( 'type' => 'string', 'default' => '' ), 'disableProductDescriptions' => array( 'type' => 'boolean', 'default' => false ), 'lock' => array( 'type' => 'object', 'default' => array( 'remove' => true, 'move' => false ) ) ), 'parent' => array( 'woocommerce/checkout-order-summary-block' ), 'textdomain' => 'woocommerce', '$schema' => 'https://schemas.wp.org/trunk/block.json', 'apiVersion' => 3 ), 'checkout-order-summary-coupon-form-block' => array( 'name' => 'woocommerce/checkout-order-summary-coupon-form-block', 'version' => '1.0.0', 'title' => 'Coupon Form', 'description' => 'Shows the apply coupon form.', 'category' => 'woocommerce', 'supports' => array( 'align' => false, 'html' => false, 'multiple' => false, 'reusable' => false ), 'attributes' => array( 'className' => array( 'type' => 'string', 'default' => '' ), 'lock' => array( 'type' => 'object', 'default' => array( 'remove' => false, 'move' => false ) ) ), 'parent' => array( 'woocommerce/checkout-order-summary-block' ), 'textdomain' => 'woocommerce', '$schema' => 'https://schemas.wp.org/trunk/block.json', 'apiVersion' => 3 ), 'checkout-order-summary-discount-block' => array( 'name' => 'woocommerce/checkout-order-summary-discount-block', 'version' => '1.0.0', 'title' => 'Discount', 'description' => 'Shows the cart discount row.', 'category' => 'woocommerce', 'supports' => array( 'align' => false, 'html' => false, 'multiple' => false, 'reusable' => false, 'lock' => false ), 'attributes' => array( 'className' => array( 'type' => 'string', 'default' => '' ), 'lock' => array( 'type' => 'object', 'default' => array( 'remove' => true, 'move' => true ) ) ), 'parent' => array( 'woocommerce/checkout-order-summary-totals-block' ), 'textdomain' => 'woocommerce', '$schema' => 'https://schemas.wp.org/trunk/block.json', 'apiVersion' => 3 ), 'checkout-order-summary-fee-block' => array( 'name' => 'woocommerce/checkout-order-summary-fee-block', 'version' => '1.0.0', 'title' => 'Fees', 'description' => 'Shows the cart fee row.', 'category' => 'woocommerce', 'supports' => array( 'align' => false, 'html' => false, 'multiple' => false, 'reusable' => false, 'lock' => false ), 'attributes' => array( 'className' => array( 'type' => 'string', 'default' => '' ), 'lock' => array( 'type' => 'object', 'default' => array( 'remove' => true, 'move' => true ) ) ), 'parent' => array( 'woocommerce/checkout-order-summary-totals-block' ), 'textdomain' => 'woocommerce', '$schema' => 'https://schemas.wp.org/trunk/block.json', 'apiVersion' => 3 ), 'checkout-order-summary-shipping-block' => array( 'name' => 'woocommerce/checkout-order-summary-shipping-block', 'version' => '1.0.0', 'title' => 'Shipping', 'description' => 'Shows the cart shipping row.', 'category' => 'woocommerce', 'supports' => array( 'align' => false, 'html' => false, 'multiple' => false, 'reusable' => false, 'lock' => false ), 'attributes' => array( 'lock' => array( 'type' => 'object', 'default' => array( 'remove' => true, 'move' => true ) ) ), 'parent' => array( 'woocommerce/checkout-order-summary-totals-block' ), 'textdomain' => 'woocommerce', '$schema' => 'https://schemas.wp.org/trunk/block.json', 'apiVersion' => 3 ), 'checkout-order-summary-subtotal-block' => array( 'name' => 'woocommerce/checkout-order-summary-subtotal-block', 'version' => '1.0.0', 'title' => 'Subtotal', 'description' => 'Shows the cart subtotal row.', 'category' => 'woocommerce', 'supports' => array( 'align' => false, 'html' => false, 'multiple' => false, 'reusable' => false, 'lock' => false ), 'attributes' => array( 'className' => array( 'type' => 'string', 'default' => '' ), 'lock' => array( 'type' => 'object', 'default' => array( 'remove' => true, 'move' => true ) ) ), 'parent' => array( 'woocommerce/checkout-order-summary-totals-block' ), 'textdomain' => 'woocommerce', '$schema' => 'https://schemas.wp.org/trunk/block.json', 'apiVersion' => 3 ), 'checkout-order-summary-taxes-block' => array( 'name' => 'woocommerce/checkout-order-summary-taxes-block', 'version' => '1.0.0', 'title' => 'Taxes', 'description' => 'Shows the cart taxes row.', 'category' => 'woocommerce', 'supports' => array( 'align' => false, 'html' => false, 'multiple' => false, 'reusable' => false, 'lock' => false ), 'attributes' => array( 'className' => array( 'type' => 'string', 'default' => '' ), 'lock' => array( 'type' => 'object', 'default' => array( 'remove' => true, 'move' => true ) ) ), 'parent' => array( 'woocommerce/checkout-order-summary-totals-block' ), 'textdomain' => 'woocommerce', '$schema' => 'https://schemas.wp.org/trunk/block.json', 'apiVersion' => 3 ), 'checkout-order-summary-totals-block' => array( 'name' => 'woocommerce/checkout-order-summary-totals-block', 'version' => '1.0.0', 'title' => 'Totals', 'description' => 'Shows the subtotal, fees, discounts, shipping and taxes.', 'category' => 'woocommerce', 'supports' => array( 'align' => false, 'html' => false, 'multiple' => false, 'reusable' => false, 'lock' => false ), 'attributes' => array( 'className' => array( 'type' => 'string', 'default' => '' ), 'lock' => array( 'type' => 'object', 'default' => array( 'remove' => true, 'move' => false ) ) ), 'parent' => array( 'woocommerce/checkout-order-summary-block' ), 'textdomain' => 'woocommerce', '$schema' => 'https://schemas.wp.org/trunk/block.json', 'apiVersion' => 3 ), 'checkout-payment-block' => array( 'name' => 'woocommerce/checkout-payment-block', 'version' => '1.0.0', 'title' => 'Payment Options', 'description' => 'Payment options for your store.', 'category' => 'woocommerce', 'supports' => array( 'align' => false, 'html' => false, 'multiple' => false, 'reusable' => false, 'inserter' => false, 'lock' => false ), 'attributes' => array( 'lock' => array( 'type' => 'object', 'default' => array( 'remove' => true, 'move' => true ) ) ), 'parent' => array( 'woocommerce/checkout-fields-block' ), 'textdomain' => 'woocommerce', '$schema' => 'https://schemas.wp.org/trunk/block.json', 'apiVersion' => 3 ), 'checkout-pickup-options-block' => array( 'name' => 'woocommerce/checkout-pickup-options-block', 'version' => '1.0.0', 'title' => 'Pickup Method', 'description' => 'Shows local pickup locations.', 'category' => 'woocommerce', 'supports' => array( 'align' => false, 'html' => false, 'multiple' => false, 'reusable' => false, 'inserter' => false, 'lock' => false ), 'attributes' => array( 'lock' => array( 'type' => 'object', 'default' => array( 'remove' => true, 'move' => true ) ) ), 'parent' => array( 'woocommerce/checkout-fields-block' ), 'textdomain' => 'woocommerce', '$schema' => 'https://schemas.wp.org/trunk/block.json', 'apiVersion' => 3 ), 'checkout-shipping-address-block' => array( 'name' => 'woocommerce/checkout-shipping-address-block', 'version' => '1.0.0', 'title' => 'Shipping Address', 'description' => 'Collect your customer\'s shipping address.', 'category' => 'woocommerce', 'supports' => array( 'align' => false, 'html' => false, 'multiple' => false, 'reusable' => false, 'inserter' => false, 'lock' => false ), 'attributes' => array( 'lock' => array( 'type' => 'object', 'default' => array( 'remove' => true, 'move' => true ) ) ), 'parent' => array( 'woocommerce/checkout-fields-block' ), 'textdomain' => 'woocommerce', '$schema' => 'https://schemas.wp.org/trunk/block.json', 'apiVersion' => 3 ), 'checkout-shipping-method-block' => array( 'name' => 'woocommerce/checkout-shipping-method-block', 'version' => '1.0.0', 'title' => 'Delivery', 'description' => 'Select between shipping or local pickup.', 'category' => 'woocommerce', 'supports' => array( 'align' => false, 'html' => false, 'multiple' => false, 'reusable' => false, 'inserter' => false, 'lock' => false ), 'attributes' => array( 'lock' => array( 'type' => 'object', 'default' => array( 'remove' => true, 'move' => true ) ) ), 'parent' => array( 'woocommerce/checkout-fields-block' ), 'textdomain' => 'woocommerce', '$schema' => 'https://schemas.wp.org/trunk/block.json', 'apiVersion' => 3 ), 'checkout-shipping-methods-block' => array( 'name' => 'woocommerce/checkout-shipping-methods-block', 'version' => '1.0.0', 'title' => 'Shipping Options', 'description' => 'Display shipping options and rates for your store.', 'category' => 'woocommerce', 'supports' => array( 'align' => false, 'html' => false, 'multiple' => false, 'reusable' => false, 'inserter' => false, 'lock' => false ), 'attributes' => array( 'lock' => array( 'type' => 'object', 'default' => array( 'remove' => true, 'move' => true ) ) ), 'parent' => array( 'woocommerce/checkout-fields-block' ), 'textdomain' => 'woocommerce', '$schema' => 'https://schemas.wp.org/trunk/block.json', 'apiVersion' => 3 ), 'checkout-terms-block' => array( 'name' => 'woocommerce/checkout-terms-block', 'version' => '1.0.0', 'title' => 'Terms and Conditions', 'description' => 'Ensure that customers agree to your Terms & Conditions and Privacy Policy.', 'category' => 'woocommerce', 'supports' => array( 'align' => false, 'html' => false, 'multiple' => false, 'reusable' => false ), 'attributes' => array( 'className' => array( 'type' => 'string', 'default' => '' ), 'checkbox' => array( 'type' => 'boolean', 'default' => false ), 'text' => array( 'type' => 'string', 'required' => false ), 'showSeparator' => array( 'type' => 'boolean', 'default' => true ) ), 'parent' => array( 'woocommerce/checkout-fields-block' ), 'textdomain' => 'woocommerce', '$schema' => 'https://schemas.wp.org/trunk/block.json', 'apiVersion' => 3 ), 'checkout-totals-block' => array( 'name' => 'woocommerce/checkout-totals-block', 'version' => '1.0.0', 'title' => 'Checkout Totals', 'description' => 'Column containing the checkout totals.', 'category' => 'woocommerce', 'supports' => array( 'align' => false, 'html' => false, 'multiple' => false, 'reusable' => false, 'inserter' => false, 'lock' => false ), 'attributes' => array( 'className' => array( 'type' => 'string', 'default' => '' ), 'checkbox' => array( 'type' => 'boolean', 'default' => false ), 'text' => array( 'type' => 'string', 'required' => false ) ), 'parent' => array( 'woocommerce/checkout' ), 'textdomain' => 'woocommerce', '$schema' => 'https://schemas.wp.org/trunk/block.json', 'apiVersion' => 3 ), 'empty-cart-block' => array( 'name' => 'woocommerce/empty-cart-block', 'version' => '1.0.0', 'title' => 'Empty Cart', 'description' => 'Contains blocks that are displayed when the cart is empty.', 'category' => 'woocommerce', 'supports' => array( 'align' => array( 'wide' ), 'html' => false, 'multiple' => false, 'reusable' => false, 'inserter' => false, 'lock' => false ), 'attributes' => array( 'lock' => array( 'type' => 'object', 'default' => array( 'remove' => true, 'move' => true ) ) ), 'parent' => array( 'woocommerce/cart' ), 'textdomain' => 'woocommerce', '$schema' => 'https://schemas.wp.org/trunk/block.json', 'apiVersion' => 3 ), 'empty-mini-cart-contents-block' => array( 'name' => 'woocommerce/empty-mini-cart-contents-block', 'version' => '1.0.0', 'title' => 'Empty Mini-Cart view', 'description' => 'Blocks that are displayed when the Mini-Cart is empty.', 'category' => 'woocommerce', 'supports' => array( 'align' => false, 'html' => false, 'multiple' => false, 'reusable' => false, 'inserter' => false, 'lock' => false, 'interactivity' => true ), 'attributes' => array( 'lock' => array( 'type' => 'object', 'default' => array( 'remove' => true, 'move' => true ) ) ), 'parent' => array( 'woocommerce/mini-cart-contents' ), 'textdomain' => 'woocommerce', 'apiVersion' => 3, '$schema' => 'https://schemas.wp.org/trunk/block.json' ), 'filled-cart-block' => array( 'name' => 'woocommerce/filled-cart-block', 'version' => '1.0.0', 'title' => 'Filled Cart', 'description' => 'Contains blocks that are displayed when the cart contains products.', 'category' => 'woocommerce', 'supports' => array( 'align' => array( 'wide' ), 'html' => false, 'multiple' => false, 'reusable' => false, 'inserter' => false, 'lock' => false ), 'attributes' => array( 'lock' => array( 'type' => 'object', 'default' => array( 'remove' => true, 'move' => true ) ) ), 'parent' => array( 'woocommerce/cart' ), 'textdomain' => 'woocommerce', '$schema' => 'https://schemas.wp.org/trunk/block.json', 'apiVersion' => 3 ), 'filled-mini-cart-contents-block' => array( 'name' => 'woocommerce/filled-mini-cart-contents-block', 'version' => '1.0.0', 'title' => 'Filled Mini-Cart view', 'description' => 'Contains blocks that display the content of the Mini-Cart.', 'category' => 'woocommerce', 'supports' => array( 'align' => false, 'html' => false, 'multiple' => false, 'reusable' => false, 'inserter' => false, 'lock' => false, 'interactivity' => true ), 'attributes' => array( 'lock' => array( 'type' => 'object', 'default' => array( 'remove' => true, 'move' => true ) ) ), 'parent' => array( 'woocommerce/mini-cart-contents' ), 'textdomain' => 'woocommerce', 'apiVersion' => 3, '$schema' => 'https://schemas.wp.org/trunk/block.json' ), 'mini-cart-cart-button-block' => array( 'name' => 'woocommerce/mini-cart-cart-button-block', 'version' => '1.0.0', 'title' => 'Mini-Cart View Cart Button', 'description' => 'Block that displays the cart button when the Mini-Cart has products.', 'category' => 'woocommerce', 'supports' => array( 'align' => false, 'html' => false, 'multiple' => false, 'reusable' => false, 'inserter' => true, 'color' => array( 'text' => true, 'background' => true ), 'interactivity' => array( 'clientNavigation' => true ) ), 'attributes' => array( 'lock' => array( 'type' => 'object', 'default' => array( 'remove' => false, 'move' => false ) ), 'cartButtonLabel' => array( 'type' => 'string', 'default' => '' ) ), 'styles' => array( array( 'name' => 'fill', 'label' => 'Fill' ), array( 'name' => 'outline', 'label' => 'Outline', 'isDefault' => true ) ), 'parent' => array( 'woocommerce/mini-cart-footer-block' ), 'textdomain' => 'woocommerce', 'apiVersion' => 3, '$schema' => 'https://schemas.wp.org/trunk/block.json' ), 'mini-cart-checkout-button-block' => array( 'name' => 'woocommerce/mini-cart-checkout-button-block', 'version' => '1.0.0', 'title' => 'Mini-Cart Proceed to Checkout Button', 'description' => 'Block that displays the checkout button when the Mini-Cart has products.', 'category' => 'woocommerce', 'supports' => array( 'align' => false, 'html' => false, 'multiple' => false, 'reusable' => false, 'inserter' => true, 'color' => array( 'text' => true, 'background' => true ), 'interactivity' => array( 'clientNavigation' => true ) ), 'attributes' => array( 'lock' => array( 'type' => 'object', 'default' => array( 'remove' => false, 'move' => false ) ), 'checkoutButtonLabel' => array( 'type' => 'string', 'default' => '' ) ), 'styles' => array( array( 'name' => 'fill', 'label' => 'Fill', 'isDefault' => true ), array( 'name' => 'outline', 'label' => 'Outline' ) ), 'parent' => array( 'woocommerce/mini-cart-footer-block' ), 'textdomain' => 'woocommerce', 'apiVersion' => 3, '$schema' => 'https://schemas.wp.org/trunk/block.json' ), 'mini-cart-footer-block' => array( 'name' => 'woocommerce/mini-cart-footer-block', 'version' => '1.0.0', 'title' => 'Mini-Cart Footer', 'description' => 'Block that displays the footer of the Mini-Cart block.', 'category' => 'woocommerce', 'supports' => array( 'align' => false, 'html' => false, 'multiple' => false, 'reusable' => false, 'inserter' => false, 'lock' => false, 'interactivity' => true ), 'attributes' => array( 'lock' => array( 'type' => 'object', 'default' => array( 'remove' => true, 'move' => true ) ) ), 'parent' => array( 'woocommerce/filled-mini-cart-contents-block' ), 'textdomain' => 'woocommerce', 'apiVersion' => 3, '$schema' => 'https://schemas.wp.org/trunk/block.json' ), 'mini-cart-items-block' => array( 'name' => 'woocommerce/mini-cart-items-block', 'version' => '1.0.0', 'title' => 'Mini-Cart Items', 'description' => 'Contains the products table and other custom blocks of filled mini-cart.', 'category' => 'woocommerce', 'supports' => array( 'align' => false, 'html' => false, 'multiple' => false, 'reusable' => false, 'inserter' => false, 'lock' => false, 'interactivity' => array( 'clientNavigation' => true ) ), 'attributes' => array( 'lock' => array( 'type' => 'object', 'default' => array( 'remove' => true, 'move' => true ) ) ), 'parent' => array( 'woocommerce/filled-mini-cart-contents-block' ), 'textdomain' => 'woocommerce', 'apiVersion' => 3, '$schema' => 'https://schemas.wp.org/trunk/block.json' ), 'mini-cart-products-table-block' => array( 'name' => 'woocommerce/mini-cart-products-table-block', 'version' => '1.0.0', 'title' => 'Mini-Cart Products Table', 'description' => 'Block that displays the products table of the Mini-Cart block.', 'category' => 'woocommerce', 'supports' => array( 'align' => false, 'html' => false, 'multiple' => false, 'reusable' => false, 'inserter' => false, 'lock' => false, 'interactivity' => true ), 'attributes' => array( 'lock' => array( 'type' => 'object', 'default' => array( 'remove' => true, 'move' => false ) ) ), 'parent' => array( 'woocommerce/mini-cart-items-block' ), 'textdomain' => 'woocommerce', 'apiVersion' => 3, '$schema' => 'https://schemas.wp.org/trunk/block.json' ), 'mini-cart-shopping-button-block' => array( 'name' => 'woocommerce/mini-cart-shopping-button-block', 'version' => '1.0.0', 'title' => 'Mini-Cart Shopping Button', 'description' => 'Block that displays the shopping button when the Mini-Cart is empty.', 'category' => 'woocommerce', 'supports' => array( 'align' => false, 'html' => false, 'multiple' => false, 'reusable' => false, 'inserter' => true, 'color' => array( 'text' => true, 'background' => true ), 'interactivity' => array( 'clientNavigation' => true ) ), 'attributes' => array( 'lock' => array( 'type' => 'object', 'default' => array( 'remove' => false, 'move' => false ) ), 'startShoppingButtonLabel' => array( 'type' => 'string', 'default' => '' ) ), 'styles' => array( array( 'name' => 'fill', 'label' => 'Fill', 'isDefault' => true ), array( 'name' => 'outline', 'label' => 'Outline' ) ), 'parent' => array( 'woocommerce/empty-mini-cart-contents-block' ), 'textdomain' => 'woocommerce', 'apiVersion' => 3, '$schema' => 'https://schemas.wp.org/trunk/block.json' ), 'mini-cart-title-block' => array( 'name' => 'woocommerce/mini-cart-title-block', 'version' => '1.0.0', 'title' => 'Mini-Cart Title', 'description' => 'Block that displays the title of the Mini-Cart block.', 'category' => 'woocommerce', 'supports' => array( 'align' => false, 'html' => false, 'multiple' => false, 'reusable' => false, 'inserter' => false, 'lock' => false, 'color' => array( 'text' => true, 'background' => false ), 'typography' => array( 'fontSize' => true ), 'interactivity' => array( 'clientNavigation' => true ) ), 'attributes' => array( 'lock' => array( 'type' => 'object', 'default' => array( 'remove' => true, 'move' => true ) ) ), 'parent' => array( 'woocommerce/filled-mini-cart-contents-block' ), 'textdomain' => 'woocommerce', 'apiVersion' => 3, '$schema' => 'https://schemas.wp.org/trunk/block.json' ), 'mini-cart-title-items-counter-block' => array( 'name' => 'woocommerce/mini-cart-title-items-counter-block', 'version' => '1.0.0', 'title' => 'Mini-Cart Title Items Counter', 'description' => 'Block that displays the items counter part of the Mini-Cart Title block.', 'category' => 'woocommerce', 'supports' => array( 'align' => false, 'html' => false, 'multiple' => false, 'reusable' => false, 'inserter' => false, 'lock' => false, 'color' => array( 'text' => true, 'background' => true ), 'typography' => array( 'fontSize' => true ), 'spacing' => array( 'padding' => true ), 'interactivity' => true ), 'parent' => array( 'woocommerce/mini-cart-title-block' ), 'textdomain' => 'woocommerce', 'apiVersion' => 3, '$schema' => 'https://schemas.wp.org/trunk/block.json' ), 'mini-cart-title-label-block' => array( 'name' => 'woocommerce/mini-cart-title-label-block', 'version' => '1.0.0', 'title' => 'Mini-Cart Title Label', 'description' => 'Block that displays the \'Your cart\' part of the Mini-Cart Title block.', 'category' => 'woocommerce', 'supports' => array( 'align' => false, 'html' => false, 'multiple' => false, 'reusable' => false, 'inserter' => false, 'lock' => false, 'color' => array( 'text' => true, 'background' => true ), 'typography' => array( 'fontSize' => true ), 'spacing' => array( 'padding' => true ), 'interactivity' => array( 'clientNavigation' => true ) ), 'attributes' => array( 'label' => array( 'type' => 'string', 'default' => '' ) ), 'parent' => array( 'woocommerce/mini-cart-title-block' ), 'textdomain' => 'woocommerce', 'apiVersion' => 3, '$schema' => 'https://schemas.wp.org/trunk/block.json' ), 'proceed-to-checkout-block' => array( 'name' => 'woocommerce/proceed-to-checkout-block', 'version' => '1.0.0', 'title' => 'Proceed to Checkout', 'description' => 'Allow customers proceed to Checkout.', 'category' => 'woocommerce', 'supports' => array( 'align' => false, 'html' => false, 'multiple' => false, 'reusable' => false, 'inserter' => false, 'lock' => false ), 'attributes' => array( 'lock' => array( 'type' => 'object', 'default' => array( 'remove' => true, 'move' => true ) ) ), 'parent' => array( 'woocommerce/cart-totals-block' ), 'textdomain' => 'woocommerce', '$schema' => 'https://schemas.wp.org/trunk/block.json', 'apiVersion' => 3 ) ); data. * * Prepares values in the product_ID_variation_meta_data cache for later use in the ProductSchema::get_variations() * method. Doing so here reduces the total number of queries needed. * * @param int[] $product_ids Product ids to prime variation cache for. */ protected function prime_product_variations( $product_ids ) { $cache_group = 'product_variation_meta_data'; $prime_product_ids = $this->get_non_cached_ids( wp_parse_id_list( $product_ids ), $cache_group ); if ( ! $prime_product_ids ) { return; } global $wpdb; // phpcs:disable WordPress.DB.PreparedSQL.NotPrepared $product_variations = $wpdb->get_results( "SELECT ID as variation_id, post_parent as product_id from {$wpdb->posts} WHERE post_parent IN ( " . implode( ',', $prime_product_ids ) . ' )', ARRAY_A ); $prime_variation_ids = array_column( $product_variations, 'variation_id' ); $variation_ids_by_parent = array_column( $product_variations, 'product_id', 'variation_id' ); if ( empty( $prime_variation_ids ) ) { return; } $all_variation_meta_data = $wpdb->get_results( $wpdb->prepare( "SELECT post_id as variation_id, meta_key as attribute_key, meta_value as attribute_value FROM {$wpdb->postmeta} WHERE post_id IN (" . implode( ',', array_map( 'esc_sql', $prime_variation_ids ) ) . ') AND meta_key LIKE %s', $wpdb->esc_like( 'attribute_' ) . '%' ) ); // phpcs:enable // Prepare the data to cache by indexing by the parent product. $primed_data = array_reduce( $all_variation_meta_data, function( $values, $data ) use ( $variation_ids_by_parent ) { $values[ $variation_ids_by_parent[ $data->variation_id ] ?? 0 ][] = $data; return $values; }, array_fill_keys( $prime_product_ids, [] ) ); // Cache everything. foreach ( $primed_data as $product_id => $variation_meta_data ) { wp_cache_set( $product_id, [ 'last_modified' => get_the_modified_date( 'U', $product_id ), 'data' => $variation_meta_data, ], $cache_group ); } } /** * Get the list of classes to apply to this block. * * @return string space-separated list of classes. */ protected function get_container_classes() { $classes = array( 'wc-block-grid', "wp-block-{$this->block_name}", "wp-block-woocommerce-{$this->block_name}", "wc-block-{$this->block_name}", "has-{$this->attributes['columns']}-columns", ); if ( $this->attributes['rows'] > 1 ) { $classes[] = 'has-multiple-rows'; } if ( isset( $this->attributes['align'] ) ) { $classes[] = "align{$this->attributes['align']}"; } if ( ! empty( $this->attributes['alignButtons'] ) ) { $classes[] = 'has-aligned-buttons'; } if ( ! empty( $this->attributes['className'] ) ) { $classes[] = $this->attributes['className']; } return implode( ' ', $classes ); } /** * Render a single products. * * @param \WC_Product $product Product object. * @return string Rendered product output. */ protected function render_product( $product ) { $data = (object) array( 'permalink' => esc_url( $product->get_permalink() ), 'image' => $this->get_image_html( $product ), 'title' => $this->get_title_html( $product ), 'rating' => $this->get_rating_html( $product ), 'price' => $this->get_price_html( $product ), 'badge' => $this->get_sale_badge_html( $product ), 'button' => $this->get_button_html( $product ), ); /** * Filters the HTML for products in the grid. * * @param string $html Product grid item HTML. * @param array $data Product data passed to the template. * @param \WC_Product $product Product object. * @return string Updated product grid item HTML. * * @since 2.2.0 */ return apply_filters( 'woocommerce_blocks_product_grid_item_html', "